<%@ page language="java" %>
<!-- plus besoin d'importer les classes -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<jsp:include page="header.jsp"/>
<% request.getSession().setAttribute("currentPage","pageCreerCompte.jsp");%>

			<div id="main" class="layout">
            <h1>Bienvenue sur le site du Miage Guitar Shop</h1>  
            Vous &#234;tes sur le site du Miage Guitar Shop, les professionnels des instruments &#224; cordes !             
			<c:if test="${requestScope.compteCree == null}">
				<br/><br/><br/>
				<h2>Merci de remplir ce formulaire :</h2>
				<br/><br/>
				
				<div id="formCreer">
			
					<jsp:useBean id="client" class="beans.ClientAdresseBean" scope="request"/>	
					<jsp:setProperty name="client" property="*"/>
                   <form method="get" action="control">
						<TABLE BORDER=0>
						<caption><big>Informations:</big></cation>
						<TR>
							<TD>Nom</TD>
							<TD><INPUT type=text name="nom" value="${client.nom}"></TD>
							<TD><span class='erreur'>${client.erreurnom}</span></TD>
						</TR>
						<TR>
							<TD>Pr&#233;nom</TD>
							<TD><INPUT type=text name="prenom" value="${client.prenom}"></TD>
							<TD><span class='erreur'>${client.erreurprenom}</span></TD>
						</TR>
						<TR>
							<TD>E-Mail</TD>
							<TD><INPUT type=text name="mail" value="${client.mail}"></TD>
							<TD><span class='erreur'>${client.erreurmail}</span></TD>
						</TR>
						<TR>
							<TD>Mot de passe</TD>
							<TD><INPUT type=password name="motdepasse" value="${client.motdepasse}"></TD>
							<TD><span class='erreur'>${client.erreurmotdepasse}</span></TD>
						</TR>	
						<TR>
							<TD>Retapez le mot de passe </TD>
							<TD><INPUT type=password name="motdepasse2" value="${client.motdepasse2}"></TD>
							<TD><span class='erreur'>${client.erreurmotdepasse2}</span></TD>
						</TR>
						</TABLE>
						<TABLE BORDER=0>
						<caption><big>Adresse:</big></caption>
						<TR>
							<TD>Num&#233;ro</TD>
							<TD><INPUT type=text name="num" value="${client.num}"></span></TD>
							<TD><span class='erreur'>${client.erreurnum}</TD>
						</TR>
						<TR>
							<TD>Rue</TD>
							<TD><INPUT type=text name="rue" value="${client.rue}"></span></TD>
							<TD><span class='erreur'>${client.erreurrue}</TD>
						</TR>
						<TR>
							<TD>Code Postal</TD>
							<TD><INPUT type=text name="cp" value="${client.CP}"></span></TD>
							<TD><span class='erreur'>${client.erreurCP}</TD>
						</TR>
						<TR>
							<TD>Ville</TD>
							<TD><INPUT type=text name="ville" value="${client.ville}"></span></TD>
							<TD><span class='erreur'>${client.erreurville}</TD>
						</TR>	
						<input type="hidden" name="cmd" value="creerCompte">
						<TR>
						</TR>	
						<input type="hidden" name="boolCree" value="true">
						<tr></tr>
						<TR>
							<td></td>
							<TD COLSPAN=2><INPUT type="submit" value="Finaliser"></TD>
						</TR>
					</TABLE>		
					</form>
					
			    </div>
			</c:if>
			<c:if test="${requestScope.compteCree != null}">
			    <br/><br/><br/>
				<h2>Bienvenue !</h2>
				<br/><br/>
				<div id='connecte'> Bravo ${param.prenom}, votre compte est d&#233;sormais cr&#233;&#233;.</div>
			</c:if>
			</div>

			<jsp:include page="leftPanel.jsp"/>
			
<jsp:include page="footer.jsp"/>